// SCENARIO SCRIPT

// This is the special script for your entire scenario. It contains
// special encounters and code accessable from anywhere in the scenario. it also
// contains the code that initializes important special things in the
// scenario (like shops and names and descriptions of special items).

// You can create your own states, but you should give all of them numbers greater than
// or equal to 10.

beginscenarioscript;

variables;

body;

// This is the state that is called every time the scenario is loaded,
// even when a save file in the scenario is loaded. Some things that should go here:
//    Names and descriptions of special items.
//    Names and effects of custom special abilities.

beginstate LOAD_SCEN_STATE;

init_special_item(0,"Rentar-Ihrno's flesh","This grisly piece of flesh is all that's left of Rentar-Ihrno. Perhaps the Empire mages can do something with it."); 
init_special_item(1,"Vahnatai Key","This key was taken off the body of a Vahnvoi Bladesmaster. It should fit a lock somewhere..."); 
init_special_item(2,"Rolar-Tel's Key","This key was give to you by Rolar Tel. It will open any door in his base for you, and also of neighbouring towns."); 
init_special_item(3,"Vampire Necklace","You took this grotesque necklace from the dust of a VERY strong Vampire. You have no idea if it holds any importance, but you took it anyway.");

init_quest(0,"Undead Problem","The Guard in the Small Cave asked you to kill some undead. Between the two storerooms in the Cave there is a secret room. Go there and kill the undead monster.");
init_quest(1,"Get Help","The wizard Thasir has asked you to reach the Town called Magical Grove. You must travel through the Valley, swiftly, else all is lost.");
init_quest(2,"Check on friends","The Slith Avatar has asked you to see what has happened to a friend of hers. (The friend lives in a farmhouse several miles down the valley.).");
init_quest(3,"Kill Torturer","Rolar-Tel has asked you to kill one of the undead in the cellars. You will be rewarded lavishly if you do so. Or so he says. However, be warned, this Undead may be able to summon aid.");
init_quest(4,"Kill Torturer - COMPLETED","Rolar-Tel has asked you to kill one of the undead in the cellars. You will be rewarded lavishly if you do so. Or so he says. However, be warned, this Undead may be able to summon aid. - COMPLETED");
init_quest(5,"Check on friends - COMPLETED","The Slith Avatar has asked you to see what has happened to a friend of hers. (The friend lives in a farmhouse several miles down the valley.). - COMPLETED");
init_quest(6,"Undead Problem - COMPLETED","The Guard in the Small Cave asked you to kill an undead. If you do that all the items in the room are yours to take. - COMPLETED");
init_quest(7,"Get Help - COMPLETED","The wizard Thasir has asked you to reach the Town called Magical Grove. You must travel through the Valley, swiftly, else all is lost. - COMPLETED");
init_quest(8,"Who's Responsible?","Thasir asked you to find out who is responsible for these Undead. Report back to him when you have eliminated the source.");
init_quest(9,"Who's Responsible? - COMPLETED","Thasir asked you to find out who is responsible for these Undead. Report back to him when you have eliminated the source. - COMPLETED");



break;

// This is the state that is called only once at the very beginning of 
// the scenario. Some things that should go here:
//    The stuff in shops.
//    Creating horses and boats.

beginstate START_SCEN_STATE;
	

// Initialize a few shops.
	
	
// Shop 0 - armor
add_item_to_shop(0,25,25);
add_item_to_shop(0,26,20);
add_item_to_shop(0,30,20);
add_item_to_shop(0,31,10);
add_item_to_shop(0,35,10);
add_item_to_shop(0,121,15);
add_item_to_shop(0,122,15);
add_item_to_shop(0,126,3);
add_item_to_shop(0,131,2);
add_item_to_shop(0,111,15);
add_item_to_shop(0,16,10);
add_item_to_shop(0,136,10);
add_item_to_shop(0,137,10);
add_item_to_shop(0,141,5);
// Shop 1 - weapons
add_item_to_shop(1,45,25);
add_item_to_shop(1,46,20);
add_item_to_shop(1,50,15);
add_item_to_shop(1,51,10);
add_item_to_shop(1,55,5);
add_item_to_shop(1,65,20);
add_item_to_shop(1,66,10);
add_item_to_shop(1,70,5);
// Shop 2 - tools
add_item_to_shop(2,170,500);
add_item_to_shop(2,171,500);
add_item_to_shop(2,172,30);
add_item_to_shop(2,174,500);
add_item_to_shop(2,177,500);
// Shop 3 - missiles
add_item_to_shop(3,85,500);
add_item_to_shop(3,86,10);
add_item_to_shop(3,90,10);
add_item_to_shop(3,95,3);
add_item_to_shop(3,100,20);
add_item_to_shop(3,101,10);
add_item_to_shop(3,105,10);
// Shop 4 - potions
add_item_to_shop(4,220,4);
add_item_to_shop(4,221,3);
add_item_to_shop(4,222,3);
add_item_to_shop(4,223,2);
// Shop 5 - food
add_item_to_shop(5,4,500);
add_item_to_shop(5,6,500);
add_item_to_shop(5,7,500);
// Shop 6 - Trainer Bloke
add_item_to_shop(6,5029,5); // adds five levels of Riposte // Donated by Kelandon
add_item_to_shop(6,5022,5); // adds five levels of Anatomy // Donated by Kelandon
add_item_to_shop(6,5000,7); // adds seven levels of strength
add_item_to_shop(6,5003,10); // adds ten levels of Endurance
add_item_to_shop(6,5001,7); // adds seven levels of Dexterity
add_item_to_shop(6,5004,25); // adds 25 levels of Melee Weapons
add_item_to_shop(6,5005,25); // adds 25 levels of Pole Weapons
add_item_to_shop(6,5006,3); // adds 3 levels of Bow
add_item_to_shop(6,5007,3); // adds 3 levels of Thrown Missiles
add_item_to_shop(6,5019,5); // adds 5 levels of Quick Strike
add_item_to_shop(6,5028,5); // adds 5 levels of Lethal Blow
// Shop 7 - Slith Avatar's Spells
add_item_to_shop(7,2000,5); // Bolt of Fire
add_item_to_shop(7,2001,5); // Light
add_item_to_shop(7,2002,5); // Call Beast
add_item_to_shop(7,2003,5); // Spray Acid
add_item_to_shop(7,2004,5); // Haste
add_item_to_shop(7,2005,5); // Slow
add_item_to_shop(7,2006,5); // Ice Lances
add_item_to_shop(7,2007,5); // Unlock Doors
add_item_to_shop(7,2008,5); // Create Illusions
add_item_to_shop(7,2009,5); // Far Sight
add_item_to_shop(7,2010,5); // Lightning Spray
add_item_to_shop(7,2011,5); // Capture Mind
add_item_to_shop(7,2012,5); // Simulacrum
add_item_to_shop(7,2013,5); // Dispel Barrier
add_item_to_shop(7,2014,5); // Summon Aid
add_item_to_shop(7,3010,5); // Mass Healing
add_item_to_shop(7,3011,5); // Mass Curing
// Shop 8 - High Priest's spells
add_item_to_shop(8,3000,7); // Healing
add_item_to_shop(8,3001,6); // Curing
add_item_to_shop(8,3002,6); // War Blessing
add_item_to_shop(8,3003,6); // Terror
add_item_to_shop(8,3004,6); // Repel Spirit
add_item_to_shop(8,3005,5); // Smite
add_item_to_shop(8,3006,5); // Summon Shade
add_item_to_shop(8,3007,3); // Enduring Barrier
add_item_to_shop(8,3008,2); // Unshackle Mind
add_item_to_shop(8,3009,2); // Move Mountains
// Shop 9 - Orla's Recipies
add_item_to_shop(9,4007,3); // Healing Elixir
add_item_to_shop(9,4008,3); // Hasting Elixir
add_item_to_shop(9,4009,3); // Energy Elixir
add_item_to_shop(9,4010,3); // Rogue's Elixir
add_item_to_shop(9,4011,3); // Strength Elixir
add_item_to_shop(9,4012,3); // Bliss Elixir
add_item_to_shop(9,4013,3); // Restoration Brew
// Shop 10 - Rolar-Tel's skills
add_item_to_shop(10,2000,5); // Bolt of Fire
add_item_to_shop(10,2001,5); // Light
add_item_to_shop(10,2002,5); // Call Beast
add_item_to_shop(10,2003,5); // Spray Acid
add_item_to_shop(10,2004,5); // Haste
add_item_to_shop(10,2005,5); // Slow
add_item_to_shop(10,2006,5); // Ice Lances
add_item_to_shop(10,2007,5); // Unlock Doors
add_item_to_shop(10,2008,5); // Create Illusions
add_item_to_shop(10,2009,5); // Far Sight
add_item_to_shop(10,2010,5); // Lightning Spray
add_item_to_shop(10,2011,5); // Capture Mind
add_item_to_shop(10,2012,5); // Simulacrum
add_item_to_shop(10,2013,5); // Dispel Barrier
add_item_to_shop(10,2014,5); // Summon Aid
add_item_to_shop(10,2015,5); // Forcecage
add_item_to_shop(10,2016,5); // Fireblast
add_item_to_shop(10,2017,5); // Arcane Summon
add_item_to_shop(10,2018,5); // Arcane Shield
add_item_to_shop(10,3000,5); // Healing
add_item_to_shop(10,3001,5); // Curing
add_item_to_shop(10,3002,5); // War Blessing
add_item_to_shop(10,3003,5); // Terror
add_item_to_shop(10,3004,5); // Repel Spirit
add_item_to_shop(10,3005,5); // Smite
add_item_to_shop(10,3006,5); // Summon Shade
add_item_to_shop(10,3007,5); // Enduring Barrier
add_item_to_shop(10,3008,5); // Unshackle Mind
add_item_to_shop(10,3009,5); // Move Mountains
add_item_to_shop(10,3010,5); // Mass Healing
add_item_to_shop(10,3012,5); // Radiant Shield
add_item_to_shop(10,3013,5); // Divine Fire
add_item_to_shop(10,3014,5); // Control Foes
add_item_to_shop(10,3015,5); // Cloud of Blades
add_item_to_shop(10,3016,5); // Return Life
add_item_to_shop(10,3017,5); // Divine Retribution
add_item_to_shop(10,3018,5); // Divine Restoration
add_item_to_shop(10,3019,5); // Divine Host
add_item_to_shop(10,4014,5); // Protection Brew
add_item_to_shop(10,4015,5); // Heroic Brew
add_item_to_shop(10,4016,5); // Knowledge Brew
add_item_to_shop(10,5039,17); // Willpower
add_item_to_shop(10,5025,5); // Magery
add_item_to_shop(10,5027,10); // Magical Effeciency
break;


// This state is called every tick wherever the party is in the scenario.
// You can use the set_state
beginstate START_STATE;

break;

// Place your own states below. Give each a number at least 10.
beginstate 10;
break;



beginstate 14;
//turn_on_debug_mode()
add_dialog_str(0,"As you take a good look at the wall ahead, your heart sinks. More enemies!",0);
// SDFs -(5,0) // infogen is main help/bug/ thing. gets updated as go along... if bugs found please email micael456@aol.com with a 'Printscreen' image of the bug error report. thank you...

break;